In recent years, memory cards on which flash memory as a semiconductor nonvolatile memory is mounted have been expanding their markets as a storage medium for storing user's data in digital cameras, portable telephones, cellular telephones, portable music playing devices, and the like. The flash memory, being a semiconductor device, has been increasing in memory card capacity with progress of semiconductor processes. Increases in memory card capacity together with decreases in bit cost make it possible that data which have heretofore been stored in other storage devices are stored collectively in one storage device, memory card. In particular, the memory card being smaller than hard disc drives, enables a circuit board to be mounted such that it has been demanded to be provided in forms or modes including NOR flash memories that have conventionally been used for storage of program codes, EEPROMs used for storage of boot codes, and battery-equipped SRAMs.
However, there are various problems in applications of memory cards with considerations given to such forms or modes shown above or semiconductor packages functionally equivalent to memory cards mounted on the circuit board. Those problems will be explained below with reference to FIGS. 5 to 7.
FIG. 5 is a schematic view showing an allocation state of information recorded in an HDD (Hard Disk Drive). Reference sign 701 denotes the HDD, 702 denotes a disk geometry storage area, and 703 denotes an HDD storage area. In the disk geometry storage area 702, is stored disk geometry which is information for calculating a capacity of the HDD storage area 703. The disk geometry, which is information related the HDD storage area 703, is information that is acquired by using an information acquisition command from outside of the HDD 701 and that is composed commonly of cylinder count, head count, sector count and the like, being information unique to the HDD 701. Therefore, the information as to the disk geometry is kept from changes and inhibited from rewriting.
The HDD storage area 703 is composed of a master boot record area (master boot sector) 704, a user partition #1 area 705, and a user partition #2 area 706. The master boot record is stored in a sector at a leading address of the HDD storage area 703. In the master boot record area 704 are stored information as to individual user partitions contained in the HDD storage area 703, i.e., address information about leading sectors of the user partition #1 and the user partition #2, and capacity information as well as format type information about the individual user partitions. It is noted here that the format type refers to information related to the file system in use.
Any information stored in the HDD storage area 703 can be accessed by address-assigned read and write operations from outside. An apparatus using the HDD 701 is enabled to correctly access each of the user partitions by reading information in the master boot record area 704 and obtaining information as to the individual user partitions in the HDD 701. Access to each user partition is enabled only by reading the information in the master boot record area 704, and does not need reading the information in the disk geometry storage area 702.
Information contained in the master boot record area 704, which is accessible from outside of the HDD 701, can be rewritten from the outside of the HDD 701. Rewriting the information in the master boot record area 704 makes it possible to change the number of partitions or capacity of each partition in the HDD storage area 703. However, it is desirable to read information stored in the disk geometry storage area 702 before rewriting the information in the master boot record area 704. HDD unique information such as total capacity of the HDD storage area 703 is useful in the rewriting of information in the master boot record area 704.
Next a case of memory cards is described below. FIG. 6 is a schematic view showing an allocation state of information recorded in a memory card. Reference sign 801 denotes the memory card, 802 denotes a card characteristic data storage area, and 803 denotes a memory card storage area. In the card characteristic data storage area 802 is stored card characteristic data which is information for calculating the capacity of the memory card storage area 803. This card characteristic data is information related to the memory card storage area 803, generally being information unique to the memory card 801 such as device size. The card characteristic data is acquired by using an information acquisition command from outside of the memory card 801.
The memory card storage area 803 is composed of a master boot record area 804 and a user partition #1 area 805. A master boot record is stored at a sector of a leading address of the memory card storage area 803. In the master boot record area 804 are stored information about user partition #1 contained in the memory card storage area 803, i.e. address information about the leading sector, capacity-related information, and information about format type, as to the user partition #1 area 805. It is noted here that the format type refers to information related to the file system in use.
Any information stored in the memory card storage area 803 can be accessed by address-assigned read and write operations from outside. An apparatus using the memory card 801 is enabled to correctly access the user partition #1 by reading the information in the master boot record area 804 and obtaining the information as to the user partition #1 in the area 805 within the memory card 801. Access to the user partition #1 is enabled only by reading the information in the master boot record area 804, and does not need reading the information in the card characteristic data storage area 802.
The information in the master boot record area 804, which is accessible from outside of the memory card 801, can be rewritten from the outside of the memory card 801. However, the number of partitions in the memory card storage area 803 is never changed, unlike the case of HDDs. The reason of this will be described later. In addition, it is desirable to read out the information in the card characteristic data storage area 802 before rewriting the information in the master boot record area 804. This is because information unique to the memory card such as the total capacity of the memory card storage area 803 is useful in rewriting the master boot record information.
Generally, the memory card has only one user partition, and does not include a plurality of partitions. This is due to differences the way of use between memory cards and HDDs. HDDs, which are used primarily for personal computers (hereinafter, referred to as ‘PCs’) and recently used also for hard disk recorders to record broadcast programs, are under an environment of use basically free from removal. The HDD can be accessed appropriately whether it has single partition or plural partitions in the system because accessing to the HDD is performed by the single system.
However, memory cards are used in most cases as an external memory for digital cameras, portable telephones, or cellular telephones, and the way of their ordinary use is in a removably attached form in connection with many types of host apparatuses. Because of such a form of use, when a plurality of partitions are made up, such confusions as shown below can be predicted: which partition an image of a digital camera is to be stored in; under the condition that a free space is not left in a partition assigned for storage but is left in another partition, whether or not recording is done with the partition changed to one other than the assigned partition; when the memory card mixedly includes a partition whose capacity is manageable for a host apparatus and another partition whose capacity is unmanageable for the host apparatus, whether or not the manageable partition, i.e. even only part of the memory card, should be made usable.
In order to prevent occurrence of such problems as shown above, host apparatuses using memory cards are, in many cases, capable of only managing a single partition alone and, also in many cases, originally designed for a single partition alone as in PCs. As for the reason of this, when data delivery between a host apparatus, which is ready for only a single partition, and a memory card is involved, there is a problem that information recorded on the memory card by a plural-partition compatible host apparatus cannot be read out by a single-partition-only-compatible host apparatus. To avoid such problems, memory cards are generally adapted to one user partition only.
FIG. 7 is a schematic view showing an allocation state of information recorded in a memory card having a plurality of partitions. In this memory card, a plurality of partitions equivalent to those of HDDs can be implemented without any technical problem. In the memory card shown in FIG. 7, information in the master boot record area 804 of the memory card of FIG. 6 is rewritten so that the memory card has information as to a plurality of user partitions. In FIG. 7, the same component elements as in FIG. 6 are designated by the same reference signs, and their description is omitted. The memory card storage area 803 is composed of a master boot record area 904, a user partition #1 area 905 and a user partition #2 area 906. A master boot record is stored at a sector of a leading address of the memory card storage area 803.
In the master boot record area 904 are stored information as to individual user partitions contained in the memory card storage area 803, i.e., address information about leading sectors of the user partition #1 and the user partition #2, and capacity information as well as format type information about the individual user partitions. It is noted here that the format type refers to information related to the file system in use.
Any information stored in the memory card storage area 803 can be accessed by address-assigned read and write operations from outside. An apparatus using the memory card 801 is enabled to correctly access each of the user partitions by reading information in the master boot record area 904 and obtaining information as to the individual user partitions in the memory card 801. Adopting such a constitution makes it possible to implement a plurality of partitions equivalent to those of HDDs.
However, such a constitution as shown above is not suitable for program codes or boot codes that are to be newly stored in the memory card. This is because reading from NOR flash memory for storage of program codes or EEPROMs for storage of boot codes conventionally does not need to read information from the master boot record area 904 to do access.
Moreover, an additional problem occurs in considering compatibility with conventional devices. Here is considered a case in which a host apparatus that operates on a precondition of one single partition performs updating of the master boot record (generally called ‘formatting’) in the memory card storage area 803 or reconstructing of the partition construction (generally called ‘partitioning’). When the reconstructing is done based on card characteristic data of the area 802, the user partition #2 of the area 906 may be destroyed or even if the destruction does not occur, the information of user partition #2 is not registered in the master boot record area 904 because the host apparatus operates on the assumption of a single partition. This is due to an inconsistency between host apparatus' recognizable areas and card characteristic data.
These conventional arts are disclosed, for example Japanese Unexamined Patent Application Publication No. 2007-518188 and JP 2004-86505.